<%@ page contentType="text/html; charset=UTF-8" %>


<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>编辑操作员信息</title>
		<style type="text/css">
		.spanDiv{
			margin:10px;
		}
		.test{
			/*display:none;*/
			width:360px;
			margin: auto;
			position:absolute;
			background-color: #f2f6fb;
			border:1px solid #56626d;
			
		}
		
		.test table{
			font-size:12px;
		}
		.test table tr{
		border-bottom:1px solid #56626d;
		}
		.selectStyle{
			width:100px;
		}
		.even1{
			background-color:#eeeeee;
		}
		.even2{
			background-color:#DDDDDD;
		}
		.td-font{
			color:#03c;font-weight:bold;
		}
		</style>
		<script language="javascript" type="text/javascript">
			function showDiv(id,cbFunction){
				var moveDiv = document.getElementById("moveDiv");
				
				moveDiv.style.left = document.body.clientWidth / 2 - 360/2;
				
				moveDiv.style.top = document.body.clientHeight / 2 - 400/2;
				var selects = document.getElementsByTagName("select");
				for (var i = 0; i<selects.length;i++){
					selects[i].style.display = "none";
				}
				var form_selects = moveDiv.getElementsByTagName("select");
				for (var j = 0; j<form_selects.length;j++){
					form_selects[j].style.display = "block";
				} 
				
				var id = arguments[0];
				var action = "";
				if (id == 'undefined' || id == null){
					action = ""; //add
				}else{
					action = ""; //modify
				}
				var sendAjax = new Ajax(action,null,true,cbFunction,"get");
				sendAjax.send();
				
				moveDiv.style.display = "block";
			}
			
			function addOPCallBack(){
				
			}
			
			function closeDiv(){
				//var selects = document.getElementsByTagName("select");
				//for (var i = 0; i<selects.length;i++){
				//	selects[i].style.display = "";
				//}
				//var moveDiv = document.getElementById("moveDiv");
				//moveDiv.style.display = "none";
				window.close(); 
			}
	</script>
</head>
<body>

<div class="test" id="moveDiv" >
			<form id="operatorInfoForm">
				<table width="360" height="400">
					<tr style="border:1px solid #56626d;">
						<td align="right"><label for="loginName">用户名：</label></td><td><input type="text" name="loginName"></td>
					</tr>
					<tr>
						<td align="right"><label for="password">密&nbsp;&nbsp;码：</label></td>
						<td><input type="password" name="password"></td>
					</tr>
					<tr>
						<td align="right"><label for="confrmPwd">确认密码：</label></td><td><input type="password" name="confrmPwd"></td>
					</tr>
					<tr>
						<td align="right"><label for="hasChild">是否允许增加子操作员：</label></td><td><input type="checkbox" name="hasChild"></td>
					</tr>
					<tr>
						<td align="right">权限组选择：</td><td></td>
					</tr>
					<tr>
						<td align="center" colspan="2">
							<table>
								<tr>
									<td>
									<select size="10"  multiple name="from" class="selectStyle" id="from"  >
									</select>
									</td>
									<td>
										<button onClick="copyAll('from','to');">->></button><br/>
										<button onClick="copyToList('from','to');">--></button><br/>
										<button onClick="copyToList('to','from');"><--</button><br/>
										<button onClick="copyAll('to','from');"><<-</button>
									</td>
									<td>
										<select size="10"  multiple name="to" class="selectStyle">
										</select>
									</td>
								</tr>
							</table>
						</td>
					</tr>
					<tr>
						<td align="center" colspan="2"><button onClick="submitOperator(this);" name="btnAction">添加</button>&nbsp;&nbsp;&nbsp;<button onClick="clearGroupForm();" name="btnCancel">取消</button></td>
					</tr>
				</table>
			</form>
		<button onClick="closeDiv();">关闭</button>
		
		</div>
		</body>
		</html>